#include"proc.h"
#include<string.h>
#include<unistd.h>

#define SIZE 102
#define PRO '_'
#define CESS '>'
void process()
{
  char arr[SIZE];
  const char* lable = "|\\-/";
  memset(arr,'\0',sizeof(arr));
  int i = 0;
  while(i <= 100)
  {
    printf("\033[44;31m[%-100s]\033[m[%d%%]\033[33m[%c]\033[m\r",arr,i,lable[i%4]);
    fflush(stdout);
//    arr[i] = ' ';
    arr[++i] = PRO;
//  if(i != 100)    arr[i] =  CESS;
    usleep(100000);
  }
}
